<template>
	<view class="scroll-list" @click="goDetail">
		<view class="scroll-list-child">
			<view class="left-desc">
				<view class="desc">
					{{item.title}}
				</view>
				<view class="cate">
					<text class="cate-list cate-list-fc">{{item.name}}</text>
					<text class="cate-list cate-list-fc">
						{{$u.timeFormat(item._createtime, 'yyyy-mm-dd')}}
					</text>
				</view>
			</view>
			<view class="right-img">
				<image :src="$baseUrl+item.img" mode="aspectFill"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				$baseUrl: "",
			}
		},
		props:{
			item:{
				type:Object,
				default:{}
			}
		},
		created() {
			this.$baseUrl = this.baseUrl
		},
		methods:{
			goDetail(){
				this.$emit('goDetail',item)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.scroll-list {
		padding: 26rpx 30rpx 0rpx 30rpx;
	
		.scroll-list-title {
			font-size: 32rpx;
			margin-bottom: 30rpx;
		}
	
		.img {
			height: 320rpx;
			display: flex;
			border-radius: 20rpx;
			overflow: hidden;
	
			.img-left,
			.img-right-2 {
				width: 450rpx;
				height: 320rpx;
	
				image {
					width: 450rpx;
					height: 320rpx;
				}
			}
	
			.img-left,
			.img-left-2 {
				margin-right: 8rpx;
			}
	
			.img-right,
			.img-left-2 {
				width: 230rpx;
				height: 100%;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
	
				.img-right-list {
					width: 230rpx;
					height: 156rpx;
	
					image {
						width: 230rpx;
						height: 158rpx;
					}
				}
			}
		}
	
		.img-1 {
			width: 100%;
			height: 320rpx;
			overflow: hidden;
			border-radius: 20rpx;
	
			image {
				width: 100%;
				height: 320rpx;
			}
		}
	
		.img-4 {
			width: 100%;
			height: 216rpx;
			border-radius: 20rpx;
			overflow: hidden;
			display: flex;
			justify-content: space-between;
	
			image {
				width: 340rpx;
				height: 216rpx;
			}
		}
	
		.cate {
			font-size: 22rpx;
			.cate-list {
				display: inline-block;
				margin-right: 26rpx;
			}
	
			.cate-list-fc {
				color: #999999;
			}
		}
		.scroll-list-child {
			display: flex;
			justify-content: space-between;
			padding-bottom: 20rpx;
	
			.left-desc {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				height: 113rpx;
				width: 100%;
				.desc {
					color: #333333;
					font-size: 26rpx;
					flex: 1;
					overflow: hidden;
					display: -webkit-box;
					-webkit-line-clamp: 2;
					line-clamp: 2;
					-webkit-box-orient: vertical;
					text-overflow: ellipsis;
					line-height: 38rpx;
				}
			}
	
			.right-img {
				margin-left: 30rpx;
				width: 193rpx;
				height: 113rpx;
				border-radius: 16rpx;
				border: 1rpx solid #dfdfdf;
				overflow: hidden;
				image {
					width: 193rpx;
					height: 113rpx;
					border-radius: 16rpx;
					border: 1rpx solid #dfdfdf;
				}
			}
		}
	}
</style>
